Skip to content

Auto add CICD label when PR author is a member or owner of flutter organization#4997

Open
gmackall wants to merge 11 commits intoflutter:mainfrom
gmackall:try_letting_ci_run_for_members
Open

Auto add CICD label when PR author is a member or owner of flutter organization#4997
gmackall wants to merge 11 commits intoflutter:mainfrom
gmackall:try_letting_ci_run_for_members

Conversation

@gmackall
Copy link
Member

@gmackall gmackall commented Mar 24, 2026

/// `OWNER` indicate the PR author belongs to the organization.
static bool _isOrgMember(PullRequest pr) {
final association = pr.authorAssociation;
return association == 'MEMBER' || association == 'OWNER';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are any of these valid:

COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNER

I'm not sure what COLLABORATOR vs CONTRIBUTOR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want MEMBER or OWNER only here, as that maps to the flutter hackers group, as I understand

@jtmcdole
Copy link
Member

I can get some pull_request events so we can validate the collaborator field

await _addCICDForRollers(pullRequestEvent);
if (pullRequestEvent.changes != null &&
pullRequestEvent.changes!.base != null) {
await _addCICDForRollersAndMembers(pullRequestEvent);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a slight behavior change, I made it this way because before the path for scheduling tests checked these conditions:
363e9cd#diff-4d5f5e21f5b7eda8e7775b9a678fb60bb6cfba3321799948fb2b9a55cefbe439L202-L206
And I figured that that was also true for the roller case, so it was hopefully fine to apply to the roller in addition to the member case. Let me know if not

@gmackall gmackall marked this pull request as ready for review March 26, 2026 00:02
@gmackall gmackall changed the title Auto schedule tests when PR author is a member of flutter organization Auto add CICD label when PR author is a member of flutter organization Mar 26, 2026
@gmackall gmackall changed the title Auto add CICD label when PR author is a member of flutter organization Auto add CICD label when PR author is a member or owner of flutter organization Mar 26, 2026
@gmackall gmackall requested a review from jtmcdole March 26, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate allowing PRs from flutter-hackers to autorun ci

3 participants